/**
 * 
 */
package connectorTests;

import static org.junit.Assert.assertTrue;

import org.junit.Before;
import org.junit.Test;

import connectors.Connection;
import connectors.Server;

/**
 * @author Lucas 'Mezmor' Pfister, Vishal Patel
 *
 */
public class ServerTests {

	Connection server;
	boolean hitException = false;
	
	@Before
	public void setUp() throws Exception {
		hitException = false;
	}

	@Test
	public void testNegativePort() {
		try {
			server = new Server(-1000);
		} catch(IllegalArgumentException e){
			hitException = true;
		}
		assertTrue(hitException);
	}
	
	@Test
	public void testMaxIntPort(){
		try{
			server = new Server(Integer.MAX_VALUE);
		} catch(IllegalArgumentException e){
			hitException = true;
		}
		assertTrue(hitException);
	}
}